import request from '@/utils/request';
export const serviceHead = '/base-service'; // 项目前缀

/**
 * 获取导出列配置列表
 * @param params
 * @returns {*}
 */
export function getTemplateColumnList (params) {
  return request({
    url: `${serviceHead}/base/exportColumnConfig/queryByModuleCode`,
    method: 'get',
    loading: true,
    params
  });
};

/**
* 获取导出列配置列表
* @param params
* @returns {*}
*/
export function getTemplateList (params) {
  return request({
    url: `${serviceHead}/base/exportTemplate/queryExportTemplateList`,
    method: 'post',
    loading: false,
    data: params
  });
};

/**
* 获取导出模版详情
* @param params
* @returns {*}
*/
export function getTemplateDetail (params) {
  return request({
    url: `${serviceHead}/base/exportTemplate/queryExportTemplateById`,
    method: 'post',
    loading: true,
    data: params
  });
};

/**
* 新增导出模板
* @param params
* @returns {*}
*/
export function addExportTemplate (params) {
  return request({
    url: `${serviceHead}/base/exportTemplate/addExportTemplate`,
    method: 'post',
    loading: true,
    data: params
  });
};

/**
* 修改导出模板
* @param params
* @returns {*}
*/
export function editExportTemplate (params) {
  return request({
    url: `${serviceHead}/base/exportTemplate/updateExportTemplate`,
    method: 'post',
    loading: true,
    data: params
  });
};

/**
* 删除导出模板
* @param params
* @returns {*}
*/
export function deleteExportTemplate (params) {
  return request({
    url: `${serviceHead}/base/exportTemplate/delExportTemplate`,
    method: 'post',
    loading: true,
    data: params
  });
};